/*******************************************************************************
*  file    : addmoledialog.hpp
*  created : 20.08.2013
*  author  : 
*******************************************************************************/

#ifndef ADDMOLEDIALOG_HPP
#define ADDMOLEDIALOG_HPP

#include <QDialog>
#include <QDateTime>


namespace Ui {
class AddMoleDialog;
}

class QRegularExpressionValidator;

class AddMoleDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit AddMoleDialog(QWidget *parent = 0);
    ~AddMoleDialog();

    QString phone () const;
    QString name  () const;
    QString passwd() const;
    QString memo  () const;
    QDateTime bat_change() const;

    void setPhone     (const QString& ) ;
    void setName      (const QString& ) ;
    void setPasswd    (const QString& ) ;
    void setMemo      (const QString& ) ;
    void setBatChange (const QDateTime& ) ;
private slots:
    void onPhoneChange(const QString&);
    void onPasswordChange(const QString&);
private:
    void testOK();
private:
    Ui::AddMoleDialog* ui;
    QRegularExpressionValidator* phone_validator_;
    QRegularExpressionValidator* passw_validator_;
    bool phone_ok_;
    bool passw_ok_;
};

#endif // ADDMOLEDIALOG_HPP
